import {createVNode, Fragment} from "../vnode";


export function renderSlots(slots, name, props) {
    const slot = slots[name]
    // 如果具名插槽对应的函数存在,那么才会去执行
    if (slot) {
        if (typeof slot === 'function') {
            return createVNode(Fragment, {}, slot(props));
        }
        // return createVNode('div', {}, slot);
    }
}

